package com.example.demo.json;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.List;

/**
 * @author FENGYU
 * @description
 * @date 2023-09-26 16:31
 */
public class JsonTest {

    public static void main(String[] args) {

        String value = "[\n" +
                "      {\n" +
                "        \"recStatus\": \"A\",\n" +
                "        \"userReleaseId\": \"ce97f623e43d424ca72653ce9f3e03e8\",\n" +
                "        \"userAchievementId\": \"d1e8ce1e46064e47b1736764b2abd386\",\n" +
                "        \"xprojectContactId\": \"0b08759fc7bf4131baacfc323fe3ec63\",\n" +
                "        \"userId\": \"683\",\n" +
                "        \"contactId\": \"174194\",\n" +
                "        \"periodNum\": 0,\n" +
                "        \"releaseType\": \"系统操作\",\n" +
                "        \"paymentPercent\": 0.0,\n" +
                "        \"plusValue\": 0.0,\n" +
                "        \"plusPercent\": 10.0,\n" +
                "        \"contactSourcePercent\": 100.0,\n" +
                "        \"releasePercent\": 100.0,\n" +
                "        \"releaseAmount\": 0.0,\n" +
                "        \"status\": \"可发放\",\n" +
                "        \"triggerDate\": \"2017-10-18\",\n" +
                "        \"ownAgencyId\": \"5\",\n" +
                "        \"ownDeptName\": \"佛山营销中心\",\n" +
                "        \"readDeptName\": \"博商佛山/佛山营销中心/直辖部\",\n" +
                "        \"validStatus\": \"离职\",\n" +
                "        \"resignDate\": \"2019-03-18\",\n" +
                "        \"assignPosition\": \"内勤\",\n" +
                "        \"xProjectContact\": {\n" +
                "          \"createDate\": \"2017-10-18\",\n" +
                "          \"xprojectContactId\": \"0b08759fc7bf4131baacfc323fe3ec63\",\n" +
                "          \"xprojectCode\": \"R20171018333521\",\n" +
                "          \"payStatus\": \"关闭记录\",\n" +
                "          \"actualAmount\": 68000.0,\n" +
                "          \"paidAmount\": 0.0,\n" +
                "          \"registrationStatus\": \"取消报名\",\n" +
                "          \"sureReleaseStatus\": \"审核通过\",\n" +
                "          \"chargePersonId\": \"683\",\n" +
                "          \"discountSum\": 0.0,\n" +
                "          \"grade\": {\n" +
                "            \"hasIncomeDetail\": false\n" +
                "          }\n" +
                "        },\n" +
                "        \"contact\": {\n" +
                "          \"code\": \"C201403043684\",\n" +
                "          \"name\": \"熊伟\",\n" +
                "          \"assignList\": [],\n" +
                "          \"requireServiceList\": [],\n" +
                "          \"offerServiceList\": [],\n" +
                "          \"serviceList\": [],\n" +
                "          \"trackList\": []\n" +
                "        },\n" +
                "        \"user\": {\n" +
                "          \"userName\": \"张安军\",\n" +
                "          \"appId\": \"dXNlckIwMDExOA==\",\n" +
                "          \"userCode\": \"B00118\",\n" +
                "          \"dataPermitList\": []\n" +
                "        },\n" +
                "        \"product\": {\n" +
                "          \"name\": \"商界精英咨询式总裁实战班（广佛）\",\n" +
                "          \"subType1\": \"EDP\",\n" +
                "          \"subType2\": \"总裁班\",\n" +
                "          \"allTypeName\": \"EDP/总裁班\"\n" +
                "        }\n" +
                "      }\n" +
                "    ]";


        List<PageData> pageDataList  = JSONObject.parseArray(value, PageData.class);


      System.out.println(pageDataList);

    }
}
